package com.rem.hutool.my7Collection;

import cn.hutool.core.collection.CollUtil;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author Rem
 * @date 2020-08-25
 */

public class CollUtilDemo {
    public static void main(String[] args) {

        String[] col = new String[]{"a", "b", "c", "d", "e"};

        // List<String> strings = Arrays.asList(col);
        ArrayList<String> list = CollUtil.newArrayList(col);

        //集合转字符串
        String strs = CollUtil.join(list, ",");
        System.err.println(strs); //a,b,c,d,e
        int i = list.get(0).hashCode();

        //排序
        List<Integer> integers = Arrays.asList(1, 7, 3, 5, 4);
        List<Integer> ts = CollUtil.sortPageAll(0, 8, (o1, o2) -> o1 - o2, integers);
        System.err.println(ts);



    }
}
